1. Field of the Invention
The present invention generally relates to a printing apparatus, and relates particularly to a printing apparatus suitable for systems, such as point-of-sale (POS) terminals and electronic cash registers (ECR), used in processing monetary transactions.
2. Description of the Background Art
In system having a host processor or computer supplying image, character and/or control data to a printer to produce an output, it is often necessary that the host computer inquire as to the various states of the printer. For example, the host may inquire as to whether there is any paper in a paper supply mechanism, whether there is sufficient toner or ink, whether there is a paper jam or any other malfunction. In response to any of these states, the processor may control the flow of data to the printer or merely notify the user of the malfunction. This can be accomplished by including a status request command within the control command set, and sending the printing apparatus status data to the host computer by executing the status request command when it is received from the host. As a result, the host computer sends the status request command as required to obtain the current status of the printing apparatus.
However, when the status of the printing apparatus changes between one execution of the status request command and the next execution of the status request command, the host computer is not informed the instant such change occurs, and a slight time lag may occur. To reduce the delay time to status change detection, the host computer frequently sends the status request command to the printing apparatus at a very short interval. This frequent sending of the status request commands greatly increases the processing performed by the host computer.
In addition, because the host computer does not know which of the printing apparatus statuses has changed, it is necessary to receive all status data with each output of the status request command, thus increasing the amount of status data and the processing overhead required to interpret the received status data. Furthermore, this large volume of status data is sent from the printing apparatus even when there is no change in the printing apparatus status, significantly reducing the efficiency of status data interpretation because status data having the same content is received and interpreted more than once consecutively. Finally, frequent execution of the status request command by the printing apparatus also reduces the throughput of the printing operation.
It is the object of the present invention to overcome the aforementioned problems associated with convention host/printer configurations.
It is a further object of the present invention to provide a printing apparatus which can send at least one predetermined status without being requested by a host computer.
It is an additional object of the present condition to provide a host/printer arrangement in which the predetermined status is preselected by the host.
It is another object of the present invention to provide a host/printer configuration which is highly reliable and efficient.
It is still yet a further object of the present invention to provide a printing apparatus whereby a high reliability, high efficiency system can be constructed by transmitting the status data after an automatic status selection and transmission command is executed only when the selected status changes, thereby enabling the host computer to obtain the change in the status of the required printing apparatus using the smallest amount of status data required.
To achieve the above object, a printing apparatus according to the present invention is connected to a host device and notifies the host device of the state of the printing apparatus, and comprises a state detection means for detecting the state of the printing apparatus. A state change detection means detects a change in the output of the state detection means, and a state notifying means for communicate the output of the state detection means to the host device based on the output of the state change detection means. In this configuration, the state change detection means comprises a state storing means for storing the state communicated to the host device by the state notifying means, and at state comparing means compares the stored state with the state detected by the state detection means.
The state detection means and state change detection means are provided in plural numbers corresponding to the states to be detected, and the state notifying means operates based on the output of at least one of the state change detection means.
The printing apparatus of the invention may further comprise a change detection limiting means for prohibiting or permitting the output of the state change detection means in a number corresponding to the number of state change detection means. In this case, the change detection limiting means prohibits or permits the output of the state change detection means based on a control command received from the host device. The state notifying means then communicates to the host device the output of the state detection means corresponding to the state change detection means permitted to output; or, the state notifying means communicates to the host device the output of the state detection means corresponding to the state change detection means that output.
Alternatively, the state detection means are separated into plural groups, and the state notifying means communicates to the host device the outputs of the state detection means contained in the group associated with the state detection means corresponding to the state change detection means that output.
To implement this configuration, it is effective for the group of state detection means to include one group of state detection means for detecting abnormal printing apparatus states, the presence of print media, and whether communications with the host device is enabled or disabled, or for detecting the state of peripheral devices connected to the printing apparatus.
In accordance with an embodiment of the present invention, once the automatic status selection and transmission command is executed, the status data is transmitted only when the selected status changes. The host computer can therefore obtain the change in the status of the required printing apparatus using the minimum required amount of status data.
The overhead for command transmission is therefore reduced because the host computer no longer frequently outputs the status request command; the amount of status data received is reduced and the overhead for status data interpretation is therefore also reduced; and the efficiency of status data interpretation is improved because only the minimum required amount of status data is used.
As is apparent, the throughput of the printing apparatus is also improved because the frequency of status request command execution is reduced.
As a result, it is possible to provide a printing apparatus whereby a high reliability system can be constructed.
Other objects and attainments together with a fuller understanding of the invention will become apparent and appreciated by referring to the following description and claims taken in conjunction with the accompanying drawings.